<?php

class Form_RoleForm extends Form_Custom_General {

    public function init() {
        
      $role_type = $this->createElement('select', 'role_type')
                #->setRequired(TRUE)
                ->setAttribs(Array( "class" => "select2"))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))                
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("role_required_type"))));
        $this->addElement($role_type);
        
       $role_contractor = $this->createElement('select', 'role_contractor')
                #->setRequired(TRUE)
                ->setAttribs(Array( "class" => "select2"))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))                
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("role_required_contractor"))));
        $this->addElement($role_contractor);
        
        
        $role_customer = $this->createElement('select', 'role_customer')
                #->setRequired(TRUE)
                ->setAttribs(Array( "class" => "select2"))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))                
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("role_required_contractor"))));
        $this->addElement($role_customer);
        
        
        
        $submit = $this->createElement('submit', 'Save')
                ->setAttribs(Array('title' => "Save changes", 'class'=>"btn-glow primary"))
                ->setLabel($this->translateObj->translate("frm_save"));
        $this->addElement($submit);


     
    }

}